package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * NotifyRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "NOTIFY_RULE")
public class NotifyRule implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4796241982612682161L;

    // Fields    
    private Long id;
    private Long resId;
    private String name;
    // private Integer type;
    private Long duration;
    private String eventLevels;
    private Integer status;

    // Constructors

    /** default constructor */
    public NotifyRule() {
    }

    /** minimal constructor */
    public NotifyRule(Long id) {
        this.id = id;
    }

    /** full constructor */
    public NotifyRule(Long id, Long resId, String name, Long duration, String eventLevels, Integer status) {
        this.id = id;
        this.resId = resId;
        this.name = name;
        // this.type = type;
        this.duration = duration;
        this.eventLevels = eventLevels;
        this.status = status;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "NOTIFY_RULE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //    @Column(name = "TYPE", precision = 1, scale = 0)
    //    public Integer getType() {
    //        return this.type;
    //    }
    //
    //    public void setType(Integer type) {
    //        this.type = type;
    //    }

    @Column(name = "DURATION", precision = 18, scale = 0)
    public Long getDuration() {
        return this.duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    @Column(name = "EVENT_LEVELS", length = 32)
    public String getEventLevels() {
        return this.eventLevels;
    }

    public void setEventLevels(String eventLevels) {
        this.eventLevels = eventLevels;
    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "NotifyRule [id=" + id + ", resId=" + resId + ", name=" + name + ", duration=" + duration + ", eventLevels=" + eventLevels + ", status=" + status + "]";
    }

}